home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dejagnu.lha / dejagnu-1.0.1 / expect / INSTALL < prev    next >
Text File  |  1993-04-26  |  6KB  |  152 lines

  1. This file is INSTALL.  It contains installation instructions for Expect.
  2.  
  3. If you are installing on a single architecture, or are just trying
  4. Expect out to see whether it's worth installing, follow the Simple
  5. Installation below.  If you are installing Expect on multiple
  6. architectures or the "Simple Installation" instructions are not
  7. sufficient, see "Sophisticated Installations" below.
  8.  
  9. --------------------
  10. Simple Installation
  11. --------------------
  12.  
  13. Run "./configure".  This will generate a Makefile (from a prototype
  14. called "Makefile.in") appropriate to your system.
  15.  
  16. Edit the Makefile and change any definitions as appropriate for your
  17. site.  All the definitions you are likely to want to change are
  18. clearly identified and described at the beginning of the file.
  19.  
  20. Run "make expect".
  21.  
  22. This will build a stand-alone Expect program which you can then
  23. experiment with.
  24.  
  25. To build everything, run "make".
  26.  
  27. This will build "expectk" (Expect with Tk) as well as libraries for
  28. embedding Expect with Tcl (libexptcl.a) and Tk (libexptk.a) in your
  29. own programs.
  30.  
  31. "make install" will install Expect and optionally Expectk and the
  32. libraries if you have built them.
  33.  
  34. A handful of people running "pure" 4.2BSD systems have noted that
  35. expect fails to link due to lack of getopt and vprintf.  You can get
  36. these from uunet or any good archive site.
  37.  
  38. --------------------
  39. Expect scripts included in the "example" directory
  40. --------------------
  41.  
  42.     kibitz - lets two people control a program at the same time.
  43.         Lots of uses.  I.e., You can help another person remotely.
  44.         Can run an editor and log a transcript of a conversation.
  45.         See man page or SP&E paper.
  46.     rogue.exp - finds a good game of rogue.
  47.     chess.exp - has two chess games play each other.
  48.     autopasswd - runs passwd non-interactively (you must be root).
  49.     passmass - sets passwd on many machines simultaneously.
  50.     timed-read - a timed read for the shell
  51.     lpunlock - unhangs a printer which says it is "waiting for lock".
  52.     dvorak - dvorak keyboard
  53.     weather - retrieves weather forecasts.
  54.     timed-run - run a program for only a given amount of time.
  55.     rftp - recursive ftp (assumes UNIX-style ftpd at other end).
  56.     archie - mails back response after talking to archie ftp-catalog.
  57.     gethostbyaddr - translates internet address to name (with a higher
  58.         success rate than nslookup).  Easier to use, too.
  59.     ftp-rfc - retrieve a DoD RFC from uunet via anonymous ftp
  60.     robohunt - plays the game of hunt (from Berkeley)
  61.         It's more of a wild player than good, but amusing to watch.
  62.         Fun to throw against people who don't know about it.
  63.     rlogin-cwd - rlogin giving you same current working directory
  64.  
  65. To run, for example, chess.exp, type:
  66.  
  67.     expect chess.exp
  68.  
  69. If expect is installed and your system supports the #! magic you can
  70. invoke it as just:
  71.  
  72.     chess.exp
  73.  
  74. Each of these examples necessarily depends upon other binaries in the
  75. system.  For example, chess.exp depends upon the "usual" UNIX chess
  76. program being present.  If any of these programs are different,
  77. it may cause the associated script to misbehave.
  78.  
  79. Please use the ".exp" extension on scripts that might otherwise have
  80. names that could be confused with the real program, such as "rogue.exp".
  81. Scripts that have unique names do not need the extension, such as "rftp".
  82.  
  83. --------------------
  84. Sample Expectk scripts included in the example directory
  85. --------------------
  86.  
  87.     xpstat - provide an X window front end to the xpilot game.
  88.  
  89. --------------------
  90. Sample C and C++ programs that use libexpect.a included in the example
  91. directory
  92. --------------------
  93.  
  94.     chesslib.c - same thing as chess.exp, but in C.
  95.     chesslib2.c - ditto, but uses popen and stream-style I/O.
  96.     chesslib++.c - ditto, but for C++.
  97.  
  98. You may change the value of CC or CPLUSPLUS in the Makefile, to
  99. compile under gcc or other compilers.  However, you may have to edit
  100. the lines defining where the libraries are.
  101.  
  102. --------------------
  103. Sophisticated Installations
  104. --------------------
  105.  
  106. The following instructions provide some suggestions for handling
  107. complex installations.
  108.  
  109. --------------------
  110. Multiple-Architecture Installation
  111. --------------------
  112.  
  113. You might want to compile a software package in a different directory
  114. from the one that contains the source code.  Doing this allows you to
  115. compile the package for several architectures simultaneously from the
  116. same copy of the source code and keep multiple sets of object files on
  117. disk.
  118.  
  119. To compile the package in a different directory from the one
  120. containing the source code, you must use a version of make that
  121. supports the VPATH variable.  GNU make and most other recent make
  122. programs can do this.
  123.  
  124. cd to the directory where you want the object files and executables to
  125. go and run configure.  configure automatically checks for the source
  126. code in the directory that configure is in and in ..  If configure
  127. reports that it cannot find the source code, run configure with the
  128. option --srcdir=dir, where dir is the directory that contains the
  129. source code.
  130.  
  131. --------------------
  132. Changing Defaults
  133. --------------------
  134.  
  135. Some of the defaults in "configure" can be overridden by environment
  136. variables.  This is a convenience intended for environments that
  137. likely affect any program that you configure and install.
  138.  
  139. The following variables are supported:
  140. CC        C compiler program.
  141.         Default is `cc', or `gcc' if `gcc' is in your PATH.
  142. INSTALL        Program to use to install files.
  143.         Default is `install' if you have it, `cp' otherwise.
  144.  
  145. These settings can also be given on the command line.  For example,
  146. you could tell configure about a particularly C compiler from a
  147. Bourne-compatible shell as follows:
  148.  
  149.     CC='gcc -traditional' DEFS=-D_POSIX_SOURCE
  150.  
  151.  
  152.